package com.niiwoo.civet.trade.report.ifcert.niwo;


import com.niiwoo.civet.trade.property.IfcertProperties;

import java.util.List;


public abstract class ReporterAdapter {

    public ReportEvents supportEvents;

    //public CertToolV1 tool = new CertToolV1();

    public static final String PHONEHASH = "phoneHash";

    public static final String USERUUID = "userUuid";

    protected boolean support(List<ReportEvents> reportEvents){
        return reportEvents != null && reportEvents.contains(this.supportEvents);
    }

    protected abstract void doReport(List<Long> projectIds, IfcertProperties ifcertProperties) ;

    /**
     * 获去phoneHash 和userUUid
     *
     * @param phonenum
     * @return
     * @throws CertException
     */
//    protected Map<String, String> getPhoneAndSalt(String phonenum) throws CertException {
//        Map<String, String> map = new HashMap<String, String>();
//        JSONObject json = tool.phoneHash(phonenum);
//        String phoneHash = json.getString("phone");
//        String salt = json.getString("salt");
//        map.put(PHONEHASH, phoneHash);
//        map.put(USERUUID, salt);
//        return map;
//    }
}
